package com.platform.common.util.query.vo;

import com.platform.common.util.query.constant.ResourceType;


/**
 * 总查询条件
 * 
 * @date Sep 19, 2017:8:02:18 PM
 * @desc com.netbox.json
 */
public class Root {

	// 查询数据的id，值为true或false
	private boolean selectID = true;

	// 资源类型
	private ResourceType resourceType;

	// 查詢條件
	private Condition condition;

	// 分页数据
	private Page page;

	// 排序条件
	private String orderBy;

	// 分组條条件
	private String groupBy;
	//开始时间
	private String beginTime;
	//结束时间
	private String endTime;

	/**
	 * 分页查询所有，排序，分组
	 * 
	 * @param resourceType
	 * @param condition
	 * @param page
	 * @param orderBy
	 * @param groupBy
	 */
	public Root(ResourceType resourceType, Condition condition, Page page, String orderBy, String groupBy,String beginTime,String endTime) {
		this.resourceType = resourceType;
		this.condition = condition;
		this.page = page;
		this.orderBy = orderBy;
		this.groupBy = groupBy;
		this.beginTime = beginTime;
		this.endTime = endTime;
	}

	/**
	 * 根据id查询条件
	 * 
	 * @param selectID
	 * @param resourceType
	 * @param condition
	 */
	public Root(boolean selectID, ResourceType resourceType, Condition condition) {
		this.selectID = selectID;
		this.resourceType = resourceType;
		this.condition = condition;
	}

	public Root() {
	}

	public void setSelectID(boolean selectID) {
		this.selectID = selectID;
	}

	public boolean getSelectID() {
		return this.selectID;
	}

	public void setResourceType(ResourceType resourceType) {
		this.resourceType = resourceType;
	}

	public ResourceType getResourceType() {
		return this.resourceType;
	}

	public void setCondition(Condition condition) {
		this.condition = condition;
	}

	public Condition getCondition() {
		return this.condition;
	}

	public void setPage(Page page) {
		this.page = page;
	}

	public Page getPage() {
		return this.page;
	}

	public void setOrderBy(String orderBy) {
		this.orderBy = orderBy;
	}

	public String getOrderBy() {
		return this.orderBy;
	}

	public void setGroupBy(String groupBy) {
		this.groupBy = groupBy;
	}

	public String getGroupBy() {
		return this.groupBy;
	}

	public String getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(String beginTime) {
		this.beginTime = beginTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	@Override
	public String toString() {
		return "Root [selectID=" + selectID + ", resourceType=" + resourceType + ", condition=" + condition + ", page="
				+ page + ", orderBy=" + orderBy + ", groupBy=" + groupBy + ", beginTime=" + beginTime + ", endTime="
				+ endTime + "]";
	}

	

}